/**
 * Created by joy on 12/09/2017.
 */
import EthWalletHelper from '../../common/helpers/chain/EthWalletHelper'
import CommonUtil from '../../common/utils/CommonUtil'
import prompt from 'prompt'


export default async () => {
  const schema = {
    properties: {
      strToCalc: {
        description: 'Enter string to calc',
        type: 'string',
        required: true,
        default: 'transfer(address,uint256)'
      },
    }
  }

  const args = await CommonUtil.getArgsFromConsole(prompt, schema)
  let { strToCalc } = args
  const ethWalletHelper = new EthWalletHelper()
  const result = ethWalletHelper.getMethodId(strToCalc)
  logger.info(result) // 0xa9059cbb
}
